//
//  HSDSpidermanTools.h
//  GoldenCard
//
//  Created by 正合适 on 2018/3/21.
//  Copyright © 2018年 合时代. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

/**
 获取当前时间戳 毫秒
 
 @return 当前时间String
 */
static NSString *currentTime() {
    NSDate *dat = [NSDate dateWithTimeIntervalSinceNow:0];
    NSTimeInterval a = [dat timeIntervalSince1970];
    NSString *timeString = [NSString stringWithFormat:@"%0.f", a*1000];
    return timeString;
}


/**
 实例对象的class

 @param object 实例
 @return calssNameStr
 */
static NSString *instanceClassName(id object) {
    Class cls = [object class];
    return NSStringFromClass(cls);
}


/**
 AppBundleID

 @return bundleId
 */
static NSString *bundleId() {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
}

/**
 版本号

 @return <#return value description#>
 */
static NSString *bundleVersion() {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
}

@interface HSDSpidermanTools : NSObject

/**
 获取最顶层vc

 @return <#return value description#>
 */
+ (UIViewController *)topViewController;

/**
 是否为最顶层的vc

 @param vc <#vc description#>
 @return <#return value description#>
 */
+ (BOOL)isTopVC:(UIViewController *)vc;

/**
 设备唯一id

 @return <#return value description#>
 */
+ (NSString *)UUID;

/**
 IDFA

 @return <#return value description#>
 */
+ (NSString *)IDFA;

/**
 系统语言

 @return <#return value description#>
 */
+ (NSString *)sysLanguage;

/**
 系统版本

 @return <#return value description#>
 */
+ (NSString *)osVersion;

/**
 iPhone机型

 @return <#return value description#>
 */
+ (NSString *)iphoneType;

/**
 屏幕分辨率

 @return <#return value description#>
 */
+ (NSString *)resolution;

/**
 运营商

 @return <#return value description#>
 */
+ (NSString *)phoneOperater;
@end
